package com.isoft.data.dao;

import com.isoft.data.xml.Ckls;
import com.isoft.data.xml.CklsDfltCklsCntr;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CklsDao {
    @Insert("insert into CKLS(SEQN,DDTM,FFID,FIDE,FATT) " +
            "VALUES(#{ckls.meta.seqn},#{ckls.meta.ddtm},#{ckls.dflt.ffid},#{ckls.dflt.fide},#{ckls.dflt.fatt})")
    void addCkls(@Param("ckls") Ckls ckls);
    @Insert("insert into CKLS_CKLS(SEQN,DDTM,FCES,FCEE,FCRS,FCRE,MCES,MCEE,MCRS,MCRE,FCDP,MCDP)" +
            " VALUES(#{ckls.meta.seqn},#{ckls.meta.ddtm},#{ckls.dflt.ckls.fces},#{ckls.dflt.ckls.fcee}" +
            ",#{ckls.dflt.ckls.fcrs},#{ckls.dflt.ckls.fcre},#{ckls.dflt.ckls.mces},#{ckls.dflt.ckls.mcee}" +
            ",#{ckls.dflt.ckls.mcrs},#{ckls.dflt.ckls.mcre},#{ckls.dflt.ckls.fcdp},#{ckls.dflt.ckls.mcdp})")
    void addCklsCkls(@Param("ckls") Ckls ckls);
    @Insert("insert into CKLS_CKLS_CNTR(SEQN,DDTM,CKNO,ID,CODE,CKAT,TYPE,CCAR,ESTR,EEND,RSTR,REND,BTSC) " +
            "VALUES(#{ckls.meta.seqn},#{ckls.meta.ddtm},#{c.ckno},#{c.cid}" +
            ",#{c.code},#{c.ckat},#{c.type},#{c.ccar}" +
            ",#{c.estr},#{c.eend},#{c.rstr},#{c.rend}" +
            ",#{c.btsc})")
    void addCklsCklsCntr(@Param("ckls") Ckls ckls, @Param("c")CklsDfltCklsCntr c);
   /* @Insert("insert into CKLS_CKLS_CNTR(SEQN,DDTM,CKNO,ID,CODE,CKAT,TYPE,CCAR,ESTR,EEND,RSTR,REND,BTSC) " +
            "VALUES(#{ckls.meta.seqn},#{ckls.meta.ddtm},#{ckls.dflt.ckls.cntr.ckno},#{ckls.dflt.ckls.cntr.id}" +
            ",#{ckls.dflt.ckls.cntr.code},#{ckls.dflt.ckls.cntr.ckat},#{ckls.dflt.ckls.cntr.type},#{ckls.dflt.ckls.cntr.ccar}" +
            ",#{ckls.dflt.ckls.cntr.estr},#{ckls.dflt.ckls.cntr.eend},#{ckls.dflt.ckls.cntr.rstr},#{ckls.dflt.ckls.cntr.rend}" +
            ",#{ckls.dflt.ckls.cntr.btsc})")*/
}
